<template>
  <basic-container>
    <div class="add-room-container">
      <h2 class="add-room-title text-center">添加子房源</h2>
      <el-form :model="form" label-width="100px">
        <el-form-item label="小区名称：" prop="name">
          <el-row :gutter="10">
            <el-col :span="18">
              <el-input v-model="form.roomName" placeholder="请输入小区名称" disabled></el-input>
            </el-col>
          </el-row>
        </el-form-item>
        <el-form-item label="房间位置：" prop="name">
          <el-row :gutter="10">
            <el-col :span="6">
              <el-input class="width-auto" v-model="form.roomName" disabled></el-input>幢
            </el-col>
            <el-col :span="6">
              <el-input class="width-auto" v-model="form.roomName" disabled></el-input>单元
            </el-col>
            <el-col :span="6">
              <el-input class="width-auto" v-model="form.roomName" disabled></el-input>楼
            </el-col>
          </el-row>
        </el-form-item>
        <el-form-item label="出租方式：" prop="name">
          <el-radio-group v-model="form.resource" disabled>
            <el-radio label="单间出租"></el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="房间类型：" prop="name">
          <el-row :gutter="10">
            <el-col :span="4">
              <el-input class="width-auto" v-model="form.roomName"></el-input>室
            </el-col>
            <el-col :span="6">
              <el-select placeholder="朝向">
                <el-option label="东"></el-option>
                <el-option label="西"></el-option>
                <el-option label="南"></el-option>
                <el-option label="北"></el-option>
              </el-select>
            </el-col>
            <el-col :span="4">
              <el-input class="width-auto" v-model="form.roomName" placeholder="面积"></el-input>㎡
            </el-col>
          </el-row>
        </el-form-item>
        <el-form-item class="text-center">
          <el-button @click="last">返回</el-button>
          <el-button type="success" @click="submit">确定</el-button>
        </el-form-item>
      </el-form>
    </div>
  </basic-container>
</template>

<script>
export default {
  name: "decentralized",
  data() {
    return {
      form: {
        manual: false,
        roomName: "",
      },
    };
  },
  methods: {
    last() {
      this.$router.go(-1);
    },
    manualHandle() {
      this.$set(this.form, "manual", !this.form.manual);
    },
    submit() {
      // 新增分散式房源
    },
  },
};
</script>

<style lang="scss" scoped>
.add-room-title {
  font-size: 18px;
}
.add-room-container {
  max-width: 800px;
  margin: 0 auto;
}
.width-auto {
  width: 70%;
  margin-right: 10px;
}
.manual-handle {
  color: #04a568;
}
</style>
<style lang="scss">
.add-room-container .el-row {
  margin: 0 !important;
}
</style>
